using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BaseEnemyRange : MonoBehaviour
{
    public PolygonCollider2D Range;
    public GameObject Enemy;

    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.layer == 7)
        {
            MsgSignal.Dispatch(EventConst.Brid, (true, Enemy));
        }
    }

    private void OnTriggerExit2D(Collider2D collision)
    {
        if (collision.gameObject.layer == 7)
        {
            MsgSignal.Dispatch(EventConst.Brid, (false, Enemy));
        }
    }

}
